import time
def bubble_sort (nums):
    swapped = True
    while swapped:
        swapped = False
        for i in range (len (nums) - 1): 
             if nums[i] > nums|i + 1]:
                ทนทร (1), nums [i + 1] = numsl1 + 11. nums[1]
                swapped = True
def readlist (filename):
     file = open(filename,' г')
     data = file. readlines ()
     return data
m1 = readlist ("mlsorted. txt")
m2 = read2list ("m2 reverse.txt"
m3 = readlist ("m3.shuffle.txt")
t_start = time. time()
bubble.sort（m1）
t_finish = time. time()
print ("ml,sorted", round((t_finish-t_start) *1000), "milliseconds")

t_start = time. time()
bubble_sort (m2)
finish = time.time()
print("m2 _reverse", round((t_finish-t_start) *1000), "milliseconds")  

t_start = time. time()
bubble
sort (m3)
finish = time.time()
print("m3_shuffle", round((t_finish-t_start)*1000), "milliseconds")
